<?php

namespace app\common\product\validate;

use think\Validate;

class ProductRuleValidate extends Validate
{
    protected $rule = [
        "id" => ["require"],
        "rule_name" => ["require"],
        "rule_value" => ["require"],
    ];

    protected $message = [
        "id.require" => "参数错误",
        "rule_name.require" => "规格名称不能为空",
        "rule_value.require" => "规格规则不能为空",
    ];

    protected $scene = [
        'create' => ['rule_name', 'rule_value'],
        'edit' => ['id', 'rule_name', 'rule_value'],
        'read' => ['id'],
        'delete' => ['id'],
    ];
}